import service from '@/utils/request'

const BeeperApi = {
  // ---------------呼叫器----------------
  addBeeper: function (data) {
    return service.post('beeper', data)
  },
  batchAddBeeper: function (data) {
    return service.post('beeper/batchAddBeeper', data)
  },
  batchUpdateBeeper: function (data) {
    return service.put('beeper/batchUpdateBeeper', data)
  },
  deleteBeeper: function (data) {
    return service.put('beeper/delete', data)
  },
  editBeeper: function (data) {
    return service.put('beeper', data)
  },
  listBeeper: function (data) {
    return service.get('beeper/page', {params: data})
  },
  listByParam: function (data) {
    return service.get('beeper/list', {params: data})
  },
  getBeeperInfo: function (data) {
    return service.get('beeper', {params: data })
  },
  checkBeeperList: function (data) {
    return service.get('beeper/record/list', {params: data })
  },
  heartbeatList:function(data){
    return service.get('equipLog/log/list', {params: data })
  },
  heartbeatPage:function(data){
    return service.get('equipLog/beat/page', {params: data })
  },
  updateRecord:function(data){
    return service.put('beeper/record/updateRecord', data)
  },
  BeeperBatchSet:function(data){
    return service.put('beeper/beeperBatchSet', data)
  },
  beeperList(data){
    return service.get('beeper/listIdName',{params:data})
  },
  beeperBtnList(data){
    return service.get('beeper/listBtnByBeeperId',{params:data})
  },
  // 重置二维码
  beeperResetUrl:function(data){
    return service.get('beeper/resetUrl', {params:data})
  },
  beeperResetOrDelete:function(data){
    return service.put('beeper/reOrDeleteBeeper', data)
  },
  beeperBatchResetOrDelete:function(data){
    return service.put('beeper/batchReOrDeleteBeeper', data)
  },

  // ---------------服务分类
  listServer:function(data){
    return service.get('serverClassify/listIdName', {params:data})
  },
  // 用户列表
  listUser:function(data){
    return service.get('beeper/listCustomerByBeeperId', {params:data})
  },
  // 全部用户
  customerList:function(data){
    return service.get('customer/listIdName', {params:data})
  },
  // 用户列表下设置主用户
  setMainUser:function(data){
    return service.put('beeper/setBeeperMainUser', data)
  },
   // 用户列表下设置主用户
   removeDisable:function(data){
    return service.put('beeper/removeDisable', data)
  },
  // 呼叫器绑定商户
  batchSetBB:function(data){
    return service.post('beeper/batchSetBB', data)
  },
  // 呼叫器关联的商户列表
  listBeeperSettle:function(data){
    return service.get('beeper/listBeeperSettle', {params:data})
  },
  // 删除关联呼叫器
  deleteBeeperSettle:function(data){
    return service.put('beeper/deleteBeeperSettle', data)
  },
  // 导出呼叫器二维码
  exportBeeper(data){
    return service.get("beeper/exportBeeper",{params:data, responseType: "blob"})
  },
  // 导出呼叫器
  exportBeeperInfo(data){
    return service.get("beeper/exportBeeperInfo",{params:data, responseType: "blob"})
  },
  // 导出呼叫器
  exportBtnData(data){
    return service.get("beeper/exportBtnData",{params:data, responseType: "blob"})
  },
  // 批量设置呼叫器可选主用户
  batchSetByBeeper(data){
    return service.post("localeMaster/batchSetByBeeper",data)
  },
  // 批量设置呼叫器可选主用户
  batchSetMain(data){
    return service.post("beeper/batchSetMain",data)
  },
  // 批量下载海报
  batchDownPoster(data){
    return service.post("beeper/batchDownPoster?ids="+data.ids,{responseType: "blob"})
  },
  // 下发指令
  sendDirectiveByMq(data){
    return service.post("beeper/sendDirectiveByMq",data)
  },
  // 下发指令
  beeperCommandRecord(data){
    return service.get("beeperCommandRecord/page",{params:data})
  },
  // 导入栋单元层
  formRefineAddress(data){
    return service.get("beeper/formRefineAddress",{params:data})
  },
  setInspect(data){
    return service.put("beeperExtend/setSourceName",data)
  },
  editContact(data){
    return service.put("beeper/updateBeeperLink",data)
  },
}

export default BeeperApi
